﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="pack://application:,,,/myBoard.Framework;Component/Themes/generic.xaml"/>
	</ResourceDictionary.MergedDictionaries>
  
  <Style x:Key="ButtonFocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="2" SnapsToDevicePixels="true"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
    <GradientStop Color="#F3F3F3" Offset="0"/>
    <GradientStop Color="#EBEBEB" Offset="0.5"/>
    <GradientStop Color="#DDDDDD" Offset="0.5"/>
    <GradientStop Color="#CDCDCD" Offset="1"/>
  </LinearGradientBrush>

  <SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
  
  <Style x:Key="DefaultButton" TargetType="{x:Type Button}">
    <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    <Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Button}">
          <Border Width="Auto" Height="Auto" BorderThickness="1,1,1,1" CornerRadius="5,5,5,5">
            <Border.BorderBrush>
              <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF0E181F" Offset="0"/>
                <GradientStop Color="#FF1E4863" Offset="1"/>
                <GradientStop Color="#FF0A1C29" Offset="0.5"/>
              </LinearGradientBrush>
            </Border.BorderBrush>
            <Border BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
              <Border.BorderBrush>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                  <GradientStop Color="#FF3975A3" Offset="0"/>
                  <GradientStop Color="#FF10293C" Offset="0.858"/>
                </LinearGradientBrush>
              </Border.BorderBrush>
              <Border BorderBrush="{x:Null}" CornerRadius="4,4,4,4">
                <Border.Background>
                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF0B2233" Offset="0"/>
                    <GradientStop Color="#FF1C3F56" Offset="1"/>
                    <GradientStop Color="#FF133043" Offset="0.801"/>
                  </LinearGradientBrush>
                </Border.Background>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="0.502*"/>
                    <RowDefinition Height="0.498*"/>
                  </Grid.RowDefinitions>
                  <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Grid.RowSpan="2"/>
                  <Border BorderBrush="{x:Null}" BorderThickness="0,0,0,0" Grid.RowSpan="1" CornerRadius="3,3,2,2">
                    <Border.Background>
                      <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#99AED6F0" Offset="0"/>
                        <GradientStop Color="#1971A4C5" Offset="1"/>
                      </LinearGradientBrush>
                    </Border.Background>
                  </Border>
                </Grid>
              </Border>
            </Border>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocused" Value="true"/>
            <Trigger Property="ToggleButton.IsChecked" Value="true"/>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="#ADADAD"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  
	<Style x:Key="PictureButton" TargetType="{x:Type Button}">
		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
		<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="1"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Border x:Name="_root" HorizontalAlignment="Center" VerticalAlignment="Top" Width="45" Height="45" BorderThickness="4" Margin="0,0,0,0" CornerRadius="2">
						<Border.BorderBrush>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF101A21"/>
								<GradientStop Color="#3F142836" Offset="1"/>
							</LinearGradientBrush>
						</Border.BorderBrush>
						<Border.Background>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF969696" Offset="0"/>
								<GradientStop Color="#FFF0F0F0" Offset="1"/>
							</LinearGradientBrush>
						</Border.Background>
						<Grid>
							<Rectangle Fill="#FFFFFFFF" Stroke="{x:Null}" RadiusX="4.305" RadiusY="4.305" Visibility="Collapsed"/>
							<ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Clip="{Binding Path=Data, ElementName=clipZone, Mode=Default}"/>
							<Path Stretch="Fill" Stroke="{x:Null}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Top" Width="62" Height="19" Data="M62,19 C62,29.49341 48.120827,38 31,38 13.879173,38 0,29.49341 0,19 13.125,19 47.375,19 62,19 z">
								<Path.Fill>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#BFFFFFFF"/>
										<GradientStop Color="#3EFFFFFF" Offset="1"/>
									</LinearGradientBrush>
								</Path.Fill>
							</Path>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
							
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="#ADADAD"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
  
</ResourceDictionary>